@startuml UC07_system_sequence
!theme plain
hide footbox
skinparam sequenceMessageAlign center
skinparam responseMessageBelowArrow true
skinparam BoxPadding 10
autonumber

title UC-07 — Resume forward cleaning after a maneuver\n(system sequence diagram)

actor "Home user\n(beneficiary)" as User
participant "Obstacle sensor\nsubsystem" as Obs
box "Roomba RVC control software\n(black box)" #E8F4FF
  participant "System" as Sys
end box
participant "Drive motors /\nwheels" as Drv
participant "Cleaning hardware" as Cln

note over User, Sys : after UC-03 / UC-04 / UC-05

Obs -> Sys : ObstacleStateChanged(forwardSafeAfterManeuver)
activate Sys
Sys -> Drv : MotionCommand(forward)
Sys -> Cln : CleaningCommand(active)

alt [typical]
  deactivate Sys
  note over Sys : next: UC-02
else [A1 immediate re-obstacle]
  Obs -> Sys : ObstacleStateChanged(forwardBlocked)
  deactivate Sys
  note over Obs, Sys : next: UC-03 or UC-05
else [E1 contradictory motion or cleaning]
  deactivate Sys
  note over User, Sys : prevented by design; no runtime sequence
end

@enduml
